<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>class类组件</title>
    <script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
    <script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>

</head>
<body>
    <div id="test">

    </div>
    <script type="text/babel">
        class Abc extends React.Component{
            render(){
                return <h1>我是class类组件,名字叫做{this.props.name}</h1>
            }
        }
        ReactDOM.render(<Abc name="Abc"/>,document.getElementById('test'))
    </script>
</body>

</html>
